﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Finance/FinanceMaster.master" AutoEventWireup="true" 
	CodeBehind="ErrorLog.aspx.cs" Inherits="WebApplication.Finance.ErrorLog" Theme="BaselineTheme" %>

<%@ Register src="../Controls/PageHeadingBarCtrl.ascx" tagname="PageHeadingBarCtrl" tagprefix="uc1" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">

<!-- Heading bar style -->
<style type="text/css">
.panelStyle 
{
	margin:auto;
	margin-top:8px;
	padding-top:8px;
	padding-bottom:8px; 
	background-color:#87CEFA;
	width:840px;	
}
.actionsGridStyle
{
	margin-left:20px;
}
.deleteButtonStyle
{
	margin-right:20px;
}
.errorColumnStyle
{
	overflow: visible; display:block;
}
</style>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<!-- Page Header -->
<div style="margin:auto; margin-top:0px; background-color:#87CEFA; width:840px;">
	<uc1:PageHeadingBarCtrl ID="PageHeadingBarCtrl1" runat="server" Title="Error Log" />
</div>

<!-- Results -->
<asp:Panel runat="server" CssClass="panelStyle" ID="pnlResults">
	<asp:GridView ID="gridResult" runat="server" AutoGenerateColumns="False" CssClass="SilverGridView"
		HorizontalAlign="Center" DataKeyNames="ErrorLogId"
		BorderStyle="None" onrowcommand="gridResult_RowCommand" >
		<Columns>

			<asp:BoundField DataField="TimestampAsText" HeaderText="Date">
				<HeaderStyle HorizontalAlign="Left" />
				<ItemStyle Width="120px" VerticalAlign="Top" />
			</asp:BoundField>

			<asp:BoundField DataField="UserFullName" HeaderText="User">
				<HeaderStyle HorizontalAlign="Left" />
				<ItemStyle Width="140px" VerticalAlign="Top" />
			</asp:BoundField>

			<asp:BoundField DataField="Action" HeaderText="Action" >
				<HeaderStyle HorizontalAlign="Left" />
				<ItemStyle Width="160px" VerticalAlign="Top" />
			</asp:BoundField>

			<asp:BoundField DataField="ErrorAsText" HeaderText="Error Details">
				<HeaderStyle HorizontalAlign="Left" Width="300px" />
				<ItemStyle Width="300px" Wrap="true" CssClass="errorColumnStyle" Font-Size="8" HorizontalAlign="Left" />
			</asp:BoundField>

			<asp:ButtonField ButtonType="Button" Text="Delete..." CommandName="DeleteError" ItemStyle-Width="96px" ItemStyle-VerticalAlign="Top" />

		</Columns>
		<EmptyDataTemplate>
			<asp:Label runat="server" Text="No errors found" CssClass="SilverLabel" />
		</EmptyDataTemplate>
	</asp:GridView>
</asp:Panel>

<!-- Commands -->
<asp:Panel runat="server" CssClass="panelStyle" ID="pnlCommands" HorizontalAlign="Right">
<asp:Button runat="server" Text="Delete All..." ID="butDeleteAll" CssClass="deleteButtonStyle"
		onclick="butDeleteAll_Click" />
		<asp:ConfirmButtonExtender ID="butDeleteAll_ConfirmButtonExtender" 
			runat="server" ConfirmText="Delete all error records?" Enabled="True" TargetControlID="butDeleteAll">
		</asp:ConfirmButtonExtender>
</asp:Panel>

</asp:Content>
